<template>
    <div class="activity-index">
        <el-table :data="prices" style="width: 100%">
            <el-table-column label="#" 
                             type="index"
                            :index="1">
            </el-table-column>
            <el-table-column label="价格 ID" prop="id">
            </el-table-column>
            <el-table-column label="天数" prop="dayNum" width="200">
            </el-table-column>
            <el-table-column label="价格(元)" prop="pirce" width="200">
            </el-table-column>
            <el-table-column label="创建时间" prop="createDate">
            </el-table-column>
            <el-table-column label="操作" prop="desc" width="150">
                <template slot-scope="scope">
                    <el-button
                      size="mini"
                      type="primary"
                      @click="userDetail(scope.$index, scope.row)">修改</el-button>
                    <el-button
                      size="mini"
                      type="danger"
                      @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>

        <!-- <div class="pages">
            <el-pagination
              background
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage4"
              :page-sizes="[10, 50, 100, 200]"
              :page-size="15"
              layout="total, sizes, prev, pager, next, jumper"
              :total="400">
            </el-pagination>
        </div> -->
    </div>
</template>
<script>
// @ 是 /src 的别名
export default {
    name: 'NoticeComponent',
    props: {

    },
    data() {
        return {
            userList: [{
              id: 1,
              day:1,
              price: 100.5,
              createDate: '2018-9-18 21:13:08'
            }],
						prices: []
        }
    },
		created:function(){
			this.axios.get('/admin/listPrice?pageNum=1&pageSize=999999')
			.then((res)=>{
				let data = res.data.data.list
				this.prices = data
				console.log(data)
			})
		},
    methods: {
      userDetail(index,obj) {
        this.$router.push("/user/detail")
      }
    }
}
</script>
<style scoped lang="styl">
.info
  display flex
  justify-conent center
  flex-direction column

 .info .img{
  width: 80px;
  height: 80px;
 }
.query
    display flex
    justify-content flex-end
    margin 0 58px 20px 0 
.pages
    display flex
    justify-content flex-end
    margin-top 20px
</style>